package com.ruoyi.common.service;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.PtDDLFieldEntity;
import com.ruoyi.common.core.domain.entity.PtDDLTableEntity;
import com.ruoyi.common.core.domain.entity.PtDMLParam;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface DDLService {

    AjaxResult createTable(PtDDLTableEntity table);

    AjaxResult createField(String tableName, List<PtDDLFieldEntity> fields);

    AjaxResult createTableAndField(PtDDLTableEntity tableEntity, List<PtDDLFieldEntity> entities);

    AjaxResult dropTable(String tableName);

    List<Map<String, Object>> list(String table);

    List<Map<String, Object>> list(String table, List<PtDMLParam> param, String fieldList);

    int insert(String tableName, List<Map<String, Object>> data);

    int delete(String tableName, List<PtDMLParam> params);

    Long count(String tableName);

    int update(String tableName, List<Map<String, Object>> data, Map<String, Object> where);
}
